package security;

import java.io.File;
import java.io.IOException;

/**
 * Abstract class for cipher files
 */
public abstract class CipherFile {
	
	
    /**
     * 
     * @param in input file
     * @param out output file
     * @throws java.io.IOException If an I/O error occurs
     */
    protected abstract void encode(File in, File out)
            throws IOException;
	
    /**
     *
     * @param in input file
     * @param out output file
     * @throws java.io.IOException If an I/O error occurs
     */
    protected abstract void decode(File in, File out)
            throws IOException;
		
    /**
     *
     * @param in input file
     * @param out output file
     * @throws java.io.IOException If an I/O error occurs
     */
    public void encrypt(File in, File out)
            throws IOException{
		encode(in,out);
	}
		
    /**
     *
     * @param in input file
     * @param out output file
     * @throws java.io.IOException If an I/O error occurs
     */
    public void decrypt(File in, File out)
            throws IOException{
		decode(in,out);
	}	
	
	
}
